package com.treasure.service.enums;

/**
* @Description:    银行编码
* @Author:         panxinwen
* @CreateDate:     2018/12/8 14:44
* @Version:        1.0
*/
public enum BankEnum {

    BCM("交通银行",45);

    private String bankName;
    private Integer bankId;

    private BankEnum(String bankName,Integer bankId) {
        this.bankName = bankName;
        this.bankId=bankId;
    }

    public static String getBankName(int bankCode){

        for (BankEnum bank : values()) {
            if (bank.bankId == bankCode) {
                return bank.bankName;
            }
        }
        return null;

    }
}
